﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Text;

namespace Jy123.Web.Manage
{
    public partial class Top : MgConfig
    {
        protected string MName;
        protected string QuickMenu;
        protected void Page_Load(object sender, EventArgs e)
        {
            Verify("#");
            MName = string.Format("{0}[{1}]", manage.MName, mRight.RName);
            QuickMenu = GetQuickMenu(manage.QuickMenu);
        }
        private string GetQuickMenu(string QuickItems)
        {
            string HTML = "<a href=\"{0}\" target=\"main\"><span>{1}</span></a>";
            string strSQL = "SELECT FMPage,RName FROM Manage_Right WHERE [ID] IN ({0})";
            StringBuilder strMenu = new StringBuilder();
            if (QuickItems != string.Empty)
            {
                DataTable dt = DBUtility.DbHelperSQL.Query(string.Format(strSQL, QuickItems)).Tables[0];
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    strMenu.AppendFormat(HTML, dt.Rows[i][0], dt.Rows[i][1]);
                }
            }
            return strMenu.ToString();
        }
    }
}
